package com.spring.application;

import com.spring.controller.BookController;
import com.spring.dao.BookDao;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Component;

import java.sql.SQLException;

@Component
public class SpringApplication_autowired_9 {


    //@AutoWired
    @Test
    public void getSpringAnnocationAutowired()  {
        ApplicationContext context = new ClassPathXmlApplicationContext("springIOC-conf-9.xml");
        BookController bookController = context.getBean("bookController", BookController.class);
        bookController.doGet();
    }
}
